package com.woniuxy02;

public class Feeder {

//    public void feed(Cat cat){
//        cat.eat();
//    }
//    public void feed(Dog dog){
//        dog.eat();
//    }
    public void feed(Animal animal){
        animal.eat();
    }

    public void play(Animal animal){
        if (animal instanceof Cat) {
            ((Cat)animal).catchMouse();
        }else if (animal instanceof Dog) {
            ((Dog)animal).catchDisk();
        }
    }
}
